<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: categories_view.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');

if($current_category_id =='')
	$current_category_id = '0';
?>
<tr>
	<td>
		<table class="table_pageHeading" border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr>
				<td class="pageHeading">
					<?php echo HEADING_TITLE; ?>
				</td>
			</tr>
		</table>
	</td>
</tr>
<tr>
	<td style="position:relative">
		<table width="100%">
			<tr>
				<td id="action_buttons"></td>
				<td align="right" id="categories_name_right"></td>
			</tr>
		</table>
		<?php
			if(not_null($_POST['multi_categories']) || not_null($_POST['multi_products']))
		        $action = "action=multi_action_confirm&".get_all_get_params(array('cPath', 'action')).'cPath='.$cPath;
		    else
		        $action = "action=multi_action&".get_all_get_params(array('cPath', 'action')).'cPath='.$cPath;
		    echo draw_form('multi_action_form', FILENAME_CATEGORIES, $action, 'POST', 'id="form_multi_action"');
		    echo '<input type="hidden" id="cPath" name="cPath" value="'.$cPath.'" />';
		?>
		<input type="hidden" value="" id="sort_order" name="sort_order" />
		<table width="100%">
			<tr>
				<td align="right">
					Kategorien sortiert 
					<select name="sort_category" id="sort_category" onchange="xajax_getCatTree($('#cPath').val(), this.value)">
						<option value="c.sort_order,cd.categories_name ASC"> - nach default - </option>
						<option value="c.sort_order ASC">&#8659; Sortierung</option>
						<option value="c.sort_order DESC">&#8657; Sortierung</option>
						<option value="cd.categories_name ASC">Name - A-Z</option>
						<option value="cd.categories_name DESC">Name - Z-A</option>
						<option value="c.categories_status DESC">Status - an</option>
						<option value="c.categories_status ASC">Status - aus</option>
					</select>
				</td>
				<td align="right">
					Produkte sortiert 
					<select name="sort_product" id="sort_product" onchange="xajax_getProducts($('#cPath').val(), this.value)">
						<option value="p.products_sort, pd.products_name ASC"> - nach default - </option>
						<option value="p.products_sort ASC">&#8659; Sortierung</option>
						<option value="p.products_sort DESC">&#8657; Sortierung</option>
						<option value="pd.products_name ASC">&#8659; Name</option>
						<option value="pd.products_name DESC">&#8657; Name</option>
						<option value="p.products_status ASC">&#8659; Status</option>
						<option value="p.products_status DESC">&#8657; Status</option>
						<option value="p.products_model ASC">&#8659; Art-Nr.</option>
						<option value="p.products_model DESC">&#8657; Art Nr.</option>
						<option value="p.products_price ASC">&#8659; Preis</option>
						<option value="p.products_price DESC">&#8657; Preis</option>
						<option value="p.products_quantity ASC">&#8659; Lagerbestand</option>
						<option value="p.products_quantity DESC">&#8657; Lagerbestand</option>
					</select>
				</td>
				<td></td>
			</tr>
			<tr>
				<td colspan="3" id="categories_name_left"></td>
			</tr>
			<tr>
				<td width="33%" class="ajax_container" valign="top">
					<div id="categories_view_left" class="td_height resizable"></div>
				</td>
				<td width="33%" class="ajax_container" valign="top">
					<div id="categories_view_middle" class="td_height resizable"></div>
				</td>
				<td width="33%" class="ajax_container" valign="top">
					<div id="categories_view_right" class="td_height"></div>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%">
						<tr>
							<td align="left" width="50%">
								<input type="checkbox" name="all_categories" id="categories" onclick="checkAll('categories')" /> <label for="categories"><?php echo SELECT_ALL_CATEGORIES ?></label>
							</td>
							<td align="center">
								<div id="count_categories"></div>
							</td>
						</tr>
					</table>
				</td>
				<td>
					<table width="100%">
						<tr>
							<td align="left" width="50%">
								<input type="checkbox" name="all_products" id="products" onclick="checkAll('products')" /> <label for="products"><?php echo SELECT_ALL_PRODUCTS ?></label>
							</td>
							<td align="center">
								<div id="count_products"></div>
							</td>
						</tr>
					</table>
				</td>
				<td align="right">
					<a id="full_screen" class="button" onclick="fullHeight()" href="javascript:void(0)"><?php echo FULL_SCREEN ?></a>
				</td>
			</tr>
		</table>
	</form>
	<div id="dialog" style="display:none"></div>
	<script type="text/javascript" src="includes/javascript/categories.js.php<?php echo (isset($_GET['cPath']) ? '?cPath='.end(explode('_', $_GET['cPath'])) : ''); ?>"></script>
</td>
<td>